<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets the minimum error severity</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mssql-init.html">mssql_init</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mssql-min-message-severity.html">mssql_min_message_severity</a></div>
 <div class="up"><a href="ref.mssql.html">Mssql 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mssql-min-error-severity" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mssql_min_error_severity</h1>
  <p class="verinfo">(PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)</p><p class="refpurpose"><span class="refname">mssql_min_error_severity</span> &mdash; <span class="dc-title">Sets the minimum error severity</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.mssql-min-error-severity-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>mssql_min_error_severity</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$severity</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sets the minimum error severity.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mssql-min-error-severity-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">severity</code></em></dt>

     <dd>

      <p class="para">
       The new error severity.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mssql-min-error-severity-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mssql-min-error-severity-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1511">
    <p><strong>Example #1 <span class="function"><strong>mssql_min_error_severity()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Connect&nbsp;to&nbsp;MSSQL&nbsp;and&nbsp;select&nbsp;the&nbsp;database<br /></span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'KALLESPC\SQLEXPRESS'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'sa'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'phpfi'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">mssql_select_db</span><span style="color: #007700">(</span><span style="color: #DD0000">'php'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Set&nbsp;the&nbsp;minimum&nbsp;error&nbsp;severity&nbsp;to&nbsp;not&nbsp;include&nbsp;SQL&nbsp;<br />//&nbsp;syntax&nbsp;errors&nbsp;by&nbsp;setting&nbsp;it&nbsp;to&nbsp;something&nbsp;greater&nbsp;than&nbsp;<br />//&nbsp;or&nbsp;equal&nbsp;to&nbsp;1.<br /></span><span style="color: #0000BB">mssql_min_error_severity</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Send&nbsp;a&nbsp;query&nbsp;we&nbsp;know&nbsp;that&nbsp;will&nbsp;cause&nbsp;an&nbsp;syntax&nbsp;error,&nbsp;in<br />//&nbsp;this&nbsp;case&nbsp;we&nbsp;use&nbsp;the&nbsp;MySQL&nbsp;quote&nbsp;signs&nbsp;instead&nbsp;of&nbsp;wrapping&nbsp;<br />//&nbsp;square&nbsp;brackets&nbsp;around&nbsp;the&nbsp;field&nbsp;and&nbsp;table&nbsp;names.<br /></span><span style="color: #0000BB">$query&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mssql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">'SELECT&nbsp;`syntax`,&nbsp;`error`&nbsp;FROM&nbsp;`MSSQL`'</span><span style="color: #007700">);<br /><br />if&nbsp;(!</span><span style="color: #0000BB">$query</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Custom&nbsp;error&nbsp;handler&nbsp;...<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mssql-init.html">mssql_init</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mssql-min-message-severity.html">mssql_min_message_severity</a></div>
 <div class="up"><a href="ref.mssql.html">Mssql 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
